<?php
/**
 * Created by PhpStorm.
 * User: 氓羽
 * Date: 2018-4-13
 * Time: 15:33
 *
 * 在PHP中，通常都是浅拷贝
 */
/*浅拷贝*/
class A{
    public $age = 0;
    public $username = "";
    public $obj =null;
}
$a = new A();
$b = clone $a;

$b->age = 1;
var_dump($a->age);